package com.itboye.textileexpres.util;

import java.text.DecimalFormat;
import java.util.Locale;

import com.itboye.textileexpres.base.MainApplication;
import com.itboye.textileexpres.base.SpPublicParams;
import com.itboye.textileexptes.config.GlobalConfig;

public class PriceChange {
	public static String Change(String price) {
		String language = SPUtils.get(MainApplication.getContext(), null,
				SpPublicParams.Language, "zh-cn") + "";
		DecimalFormat df = new DecimalFormat("######0.00");
		if (language.endsWith("zh-cn")) {
			price = "￥" + df.format(Double.parseDouble(price) / 100) + "";
		} else {
			price = "$"
					+ df.format(Double.parseDouble(price)
							/ (100 * Double.parseDouble(SPUtils.get(
									MainApplication.getContext(), null,
									SpPublicParams.RMB_rate, "7")
									+ ""))) + "";
		}
		return price;

	}

}
